<?php
print_r($_FILES);

//if ($_FILES['avatar']['error'] == 0) {
//    $pathinfo = pathinfo($_FILES['avatar']['name']);
//    $ext = $pathinfo['extension'];
//    $filename = './upload/2021/10/' . md5(mt_rand(10000, 99999)) . '.' . $ext;
//    move_uploaded_file($_FILES['avatar']['tmp_name'],
//        $filename);
//} else {
//    echo '文件上传错误';
//}

